{% stylesheet %}
.block_pinterest_content > span {
  max-width: 100% !important;
}

{% endstylesheet %}

<div class="block_pinterest">
    <div class="container_wrapper">
				{% include 'block_title', title:section.settings.title , detail:section.settings.detail %}
        <div class="block_pinterest_content" {% if section.settings.height == "" %}style="min-height: 500px;"{% endif %}>
            <a data-pin-do="embedUser"  data-pin-board-width="1200" data-pin-scale-height="500" data-pin-scale-width="80" href="https://www.pinterest.com/{{ section.settings.account }}"></a>
        </div>
    </div>
</div>
<script async defer src="//assets.pinterest.com/js/pinit.js"></script>
{% schema %}
{
	"name": {
		"zh_CN": "Pinterest",
		"en_US": "Pinterest"
	},
	"max_blocks": 0,
	"tag": "section",
	"class": "block_pinterest",
	"is_global": false,
	"settings": [
		{
			"type": "card_header",
			"label": {
				"zh_CN": "设置",
				"en_US": "Settings"
			}
		},
		{
			"type": "card_input",
			"id": "title",
			"label": {
				"zh_CN": "标题",
				"en_US": "Title"
			},
			"placeholder": {
				"zh-CN": "请输入标题"
			}
		},
		{
			"type": "card_text_editor",
			"id": "detail",
			"label": {
				"zh_CN": "简短描述",
				"en_US": "Short description"
			},
			"placeholder": {
				"zh-CN": "请输入描述"
			}
		},
		{
			"type": "card_input",
			"id": "account",
			"label": {
				"zh_CN": "账号",
				"en_US": "Account number"
			},
			"placeholder": {
				"zh_CN": "请输入账号,如XXXXX",
				"en_US": "Please enter account, such as XXXXX"
			},
			"info": {
				"zh_CN": "Pinterest账号，例如:https://www.pinterest.com/XXXXX",
				"en_US": "Pinterest account, for example: https://www.pinterest.com/XXXXX"
			}
		},
		{
			"type": "card_input",
			"id": "height",
			"label": {
				"zh_CN": "高度",
				"en_US": "Height"
			}
		}
	],
	"blocks": [],
	"default": {
		"settings": {
			"title": "Pinterest",
			"detail": "Display the latest updated list from Pinterest account.",
			"account": "",
			"height": "500"
		},
		"blocks": []
	},
	"icon": "icon-pinterest"
}
{% endschema %}